Focus detecting apparatus, lens apparatus including the same, image pickup apparatus, and method of detecting defocus amount

ABSTRACT

A focus detector, which detects a defocus amount from a displacement amount between images formed by a pair of light beams split from an image pickup system so as to pass through a pair of pupil regions, includes a pair of lenses and phase difference sensors, a memory unit for storing an image displacement amount between the image signals on the phase difference sensors in an in-focus state, a waveform read out controller for setting pixels to be calculated for the phase difference sensors, respectively, based on the image displacement amount, a correlation calculator for calculating a correlation amount between the image signals from the pixels to be calculated, a waveform degree-of-conformity calculator for calculating a waveform degree-of-conformity based on the image signals obtained from the pixels to be calculated, and a defocus calculator for calculating the defocus amount based on the correlation amount and the waveform degree-of-conformity.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to an optical apparatus such as abroadcasting lens or a video camera lens, and more particularly, to afocus detecting apparatus for automatic focus function, a lens apparatusincluding the same, an image pickup apparatus, and a method of detectinga defocus amount.

2. Description of the Related Art

Conventionally, there are various proposals as an automatic focus (AF)technology for an image pickup apparatus such as a camera or a videocamera. For instance, the following automatic focus adjustment method iswell known. Light beams from an object passing through different exitpupil regions of an image pickup lens are guided to form images on apair of line sensors, and the object images are photoelectricallyconverted so as to obtain a pair of image signals. Then, a relativeposition displacement amount between the image signals is determined.Based on this displacement amount, a defocus amount of the object iscalculated so as to drive the image pickup lens for the automatic focusadjustment.

This AF system using phase difference detection can determine a focusingposition of a focus lens from an object distance, and hence has afeature that focusing can be performed faster than in a contrast AFsystem.

Japanese Patent Application Laid-Open No. 2010-66712 discloses a methodof increasing a defocus range of focus detection by decreasing thenumber of pixels to be subject to correlation calculation on the twoline sensors to be used for normal phase difference detection so as toincrease a pixel shift amount for the correlation calculation, in orderto reduce the probability of automatically entering a scan AF mode fordetecting a focus shift while driving the focus lens when the focusdetection by the phase difference detection method cannot be performed.

However, in Japanese Patent Application Laid-Open No. 2010-66712, thedefocus range for focus detection can be widened, but detection accuracyis lowered because the number of pixels to be subject to correlationcalculation is reduced. In addition, false detection is apt to occurdepending on an object position on an AF sensor.

In a phase difference AF method as a detection method using a light beamdifferent from that of an image pickup system, it is necessary to adjustan imaging position (sensor back) of a phase difference AF sensor as anAF detection unit with respect to an image of the image pickup system.This is due to an error between an optical distance from the separatingoptical system to the phase difference AF sensor and an optical distancefrom the separating optical system to the image plane, and a mountingaccuracy of the phase difference AF sensor. However, when using a linesensor or the like capable of detecting a phase difference in multiplepositions in a photographed image, because a sensor back amount isdifferent for each line sensor, the sensor back amount as an adjustmentamount for each line sensor is stored, and a focusing operation isperformed based on the stored sensor back amount. In other words, as toone object image, on a pair of line sensors, it is necessary to performthe focusing operation by adjusting, for each pair of line sensors, astate where the images are formed at positions displaced in alongitudinal direction of the line sensor with respect to an ideal statewhere the images are formed at the same position in the longitudinaldirection of the line sensor.

However, due to a displacement amount of this sensor back, if an objectas an AF target exists near a sensor end, the same object cannot be atarget of the comparison between the pair of line sensors, and thusfalse detection may occur.

SUMMARY OF THE INVENTION

According to one embodiment of the present invention, there is provideda focus detecting apparatus for detecting a defocus amount of an imagepickup optical system based on a displacement amount between a pair ofimages formed by a pair of light beams split from the image pickupoptical system so as to pass through a pair of pupil regions, the focusdetecting apparatus including: a pair of lenses; a pair of phasedifference detecting sensors for photoelectrically converting a pair ofobject images formed by the pair of lenses into a pair of image signals;a memory unit for storing an image displacement amount, which is animaging position displacement in a longitudinal direction of the pair ofphase difference detecting sensors, between the pair of image signalsobtained by the pair of phase difference detecting sensors when theimage pickup optical system focuses on a predetermined object; awaveform read out controller for setting pixels to be calculated for thepair of phase difference detecting sensors, respectively, based on theimage displacement amount stored in the memory unit; a correlationcalculator for calculating a correlation amount between the pair ofimage signals obtained from the pixels to be calculated of the pair ofphase difference detecting sensors; a waveform degree-of-conformitycalculator for calculating a waveform degree-of-conformity that is adegree-of-conformity between the pair of image signals based on the pairof image signals obtained from the pixels to be calculated of the pairof phase difference detecting sensors; and a defocus amount calculatorfor calculating the defocus amount based on the correlation amountcalculated by the correlation calculator and the waveformdegree-of-conformity calculated by the waveform degree-of-conformitycalculator.

According to one embodiment of the present invention, it is possible toprovide the focus detecting apparatus that can obtain an accurate resultof distance measurement regardless of a position of the object as an AFtarget on the sensor, even if a back displacement is generated betweenan image of the image pickup system and the AF sensor.

Further features of the present invention will become apparent from thefollowing description of exemplary embodiments with reference to theattached drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram according to a first embodiment of the presentinvention.

FIG. 2 is a block diagram of a focus detector according to the firstembodiment of the present invention.

FIG. 3 is an AF sensor back displacement waveform diagram.

FIG. 4 is a two-image AF sensor waveform diagram.

FIG. 5A is a correspondence diagram of pixels to be subject tocorrelation calculation without a shift.

FIG. 5B is an Image A waveform diagram to be a target of the correlationcalculation without a shift.

FIG. 5C is an Image B waveform diagram to be a target of the correlationcalculation without a shift.

FIG. 6A is a correspondence diagram of pixels to be subject tocorrelation calculation when Image B is shifted to the left.

FIG. 6B is an Image A waveform diagram to be a target of the correlationcalculation when Image B is shifted to the left.

FIG. 6C is an Image B waveform diagram to be a target of the correlationcalculation when Image B is shifted to the left.

FIG. 7A is a correspondence diagram of pixels to be subject to thecorrelation calculation when Image B is shifted to the right.

FIG. 7B is an Image A waveform diagram to be a target of the correlationcalculation when Image B is shifted to the right.

FIG. 7C is an Image B waveform diagram to be a target of the correlationcalculation when Image B is shifted to the right.

FIG. 8 is a two-image correlation amount difference diagram with respectto a pixel shift amount.

FIG. 9 is a waveform degree-of-conformity diagram with respect to thepixel shift amount.

FIG. 10 is a two-image AF sensor waveform diagram.

FIG. 11 is a two-image AF sensor waveform diagram.

FIG. 12 is a flowchart of a sensor waveform read out controller.

FIG. 13A is an Image A waveform diagram after sensor waveform read outcontrol.

FIG. 13B is an Image B waveform diagram after the sensor waveform readout control.

DESCRIPTION OF THE EMBODIMENTS

In the following, an exemplary embodiment of the present invention isdescribed in detail with reference to the attached drawings.

Embodiment

FIG. 1 is a block diagram of a zoom lens apparatus 100 including a focusdetecting apparatus of the present invention.

The zoom lens apparatus 100 includes an image pickup optical systemincluding a focus lens 101, a zoom lens 105, a variable aperture stop109, a spectroscopic prism 113, and a relay lens 114. The focus lens 101is driven by a focus motor 102 to move in an optical axis direction, soas to change a position of an image plane of the zoom lens apparatus100.

The focus motor 102 is driven by a focus driver 103. A position of thefocus lens 101 is detected by a focus position detector 104.

The zoom lens 105 is driven by a zoom motor 106 to move in the opticalaxis direction so as to change a focal length of the zoom lens apparatus100. The zoom motor 106 is driven by a zoom driver 107. A position ofthe zoom lens 105 is detected by a zoom position detector 108.

The variable aperture stop 109 is driven by an iris motor 110, which isdriven by an iris driver 111. A position of the variable aperture stop109 is detected by an iris position detector 112.

The spectroscopic prism 113 splits light from the object after passingthrough the focus lens 101 and the zoom lens 105 into two light beams.The light beam after passing through the spectroscopic prism 113(transmitted light) passes through the relay lens 114 and enters animage pickup element 115 of a camera apparatus or the like to which thezoom lens apparatus is connected. In addition, the light beam reflectedby the spectroscopic prism 113 (reflected light) enters a focus detector117.

The focus detector 117 calculates a phase difference between a pair ofimage signals so as to calculate a defocus amount. A lens controller 116drives the focus lens 101 and controls the zoom lens 105 and thevariable aperture stop 109 based on the phase difference obtained by thefocus detector 117.

FIG. 2 illustrates structure of the focus detector 117. The reflectedlight reflected by the spectroscopic prism 113 enters an AF sensor 118.The AF sensor 118 includes a pair of phase difference detecting lensesand a pair of phase difference detecting sensors. A pair of images (twoimages) formed by two light beams after passing through a pair of pupilregions and being divided by the phase difference detecting lens arephotoelectrically converted by the phase difference detecting sensor sothat image signals are generated. The two image signals (luminancesignals) accumulated as charges in the phase difference detecting sensorare read out and stored in a sensor waveform memory unit 119. Theembodiment exemplifies a case where the pair of phase differencedetecting sensors is formed of a pair of line sensors, but the presentinvention is not limited thereto. It is sufficient that the sensors canspecify positions (shapes) of the pair of images formed through the pairof phase difference detecting lenses.

A sensor back memory unit 120 stores a phase difference amount FBbetween the two images (Image A and Image B) output from the AF sensor118 when an image of the image pickup system is focused as illustratedin FIG. 3.

If there is no phase difference amount FB between the two images (ImageA and Image B) output from the AF sensor 118 when an image of the imagepickup system is in an in-focus state, the pair of AF sensors 118 hasthe same imaging position in the longitudinal direction of the linesensor. In other words, when one of the output values of the pair of AFsensors 118 is overlaid with the output value of the other AF sensor118, the images can be confirmed on the same position. However, if thereis the phase difference amount FB, the image is formed at a positiondisplaced in the longitudinal direction of the line sensor. Therefore,when one of the output values of the pair of AF sensors 118 is overlaidwith the output value of the other AF sensor 118, the correspondingimages are confirmed at positions displaced from each other (FIG. 10).This displacement is due to an error between an optical distance fromthe separating optical system to the phase difference AF sensor and anoptical distance from the separating optical system to the image plane,a position accuracy of disposing the phase difference AF sensor (aposition displacement in a vertical direction with respect to theoptical axis, a displacement of the sensor plane from the optical axisin the vertical direction), and the like. The sensor back memory unit120 as a memory unit stores a phase difference amount FB correspondingto this image displacement amount with respect to the phase differenceAF sensor pair (FIG. 10). If there are multiple phase difference AFsensor pairs, the phase difference amount FB is stored for each phasedifference AF sensor pair.

In consideration of a phase difference amount FB stored in the sensorback memory unit 120, a sensor waveform read out controller 121generates a sensor waveform read out control signal, which is sent tothe sensor waveform memory unit 119.

The sensor waveform memory unit 119 supplies a correlation calculationprocessor 122 with a pair of sensor waveforms (image signals) to be usedfor defocus amount calculation among the stored and read pair of sensorwaveforms, based on pixels to be calculated specified by the sensorwaveform read out control signal from the sensor waveform read outcontroller 121.

Now, a case where the pair of sensor waveforms shown in FIG. 4 issupplied to the correlation calculating processor 122 is exemplified todescribe two-image correlation calculation and waveformdegree-of-conforming calculation.

The correlation calculating processor 122 performs correlationcalculation on the same position of a pair of sensor pixels as shown inFIG. 5A (between pixels in a broken line portion). Image A and Image Bas the pair of sensor waveforms in that case are shown in FIG. 5B and inFIG. 5C, respectively.

Here, the correlation calculation is calculation of obtaining a sum(correlation value COR) of absolute values of differences betweencorresponding pixel data of Image A and Image B over the entire pixelrange for comparing Image A with Image B, and is obtained by thefollowing equation (1).

$\begin{matrix}{{COR} = {\sum\limits_{i}{{A_{i} - B_{i}}}}} & (1)\end{matrix}$where A_(i) and B_(i) represent the i-th pixel value of Image A and thei-th pixel value of Image B, respectively.

Next, a sensor pixel position of Image A is fixed while the sensorwaveform of Image B is shifted to the left one by one pixel, so as toperform the correlation calculation similarly in the part of thecorresponding pixel between Image A and Image B. In this case, in FIG.5A, pixels are assigned numerals of 1, 2, and so on in order from theleft side to the right side. Then, when the waveform of Image B isshifted to the left by k pixels, supposing that the number of totalpixels is n, a correlation amount COR(k) (k≧0) is calculated by thefollowing equation (1a) comparing A₁ to A_(n-k) with B_(1+k) to B_(n).

$\begin{matrix}{{{COR}(k)} = {\sum\limits_{i = 1}^{n - k}{{A_{1} - B_{1 + k}}}}} & \left( {1a} \right)\end{matrix}$Shifting to the left sequentially one by one pixel is repeated until thenumber of pixels for defocus amount calculation becomes a predeterminednumber of pixels to be subject to correlation calculation as shown inFIG. 6A. FIGS. 6B and 6C show sensor waveforms of Image A and Image Bwhen the number of pixels to be subject to correlation calculationbecomes a predetermined value (in this case, for example, 10 pixels).Here, the predetermined value of the number of pixels to be subject tocorrelation calculation is a minimum number of pixels to be set inadvance for reducing the probability of false detection, because whenthe number of pixels to be subject to correlation calculation isdecreased, a defocus range to be subject to focus detection isincreased, but false detection of focus may occur with high probability.

Next, the sensor pixel position of Image A is fixed while the sensorwaveform of Image B is shifted to the right one by one pixel so as toperform similar correlation calculation. In this case too, the waveformof Image B is shifted to the right by k pixels, and A_(1+k) to A_(n) arecompared with B₁ to B_(n-k) respectively so as to calculate thecorrelation amount. It is supposed that the number of shift is positivewhen the sensor waveform of Image B is shifted to the left and thenumber of shift is negative when the sensor waveform of Image B isshifted to the right. In this case, the correlation amount COR(k) (k>0)is expressed by the equation (1b).

$\begin{matrix}{{{COR}(k)} = {\sum\limits_{i = 1}^{n + k}{{A_{1 - k} - B_{1}}}}} & \left( {1b} \right)\end{matrix}$Shifting to the right sequentially one by one pixel is repeated untilthe number of pixels to be subject to correlation calculation becomes apredetermined value as shown in FIG. 7A. FIGS. 7B and 7C show the sensorwaveforms of Image A and Image B when the number of pixels to be subjectto correlation calculation becomes a predetermined value (in this case,for example, 10 pixels).

After every correlation calculation process is finished, a correlationamount difference ΔCOR(k) between the two images when shifting by kpixels is calculated by the equation (2) based on the correlation amountCOR(k) when shifting by k pixels and a correlation amount COR(k+1) whenshifting by k+1 pixels.ΔCOR(k)={-COR(k)−COR(k+1)}×N  (2)where N represents a value obtained by dividing the number of pixels tobe compared when the number of shifted pixels k is zero by the number ofpixels to be compared when the number of shifted pixels is k, becausethe number of pixels for comparing Image A with Image B depends on apixel shift amount. In the equation (2), N is multiplied for normalizingwith respect to the number of pixels to be compared. When the pixelshift amount k is zero, all pixels in Image A and Image B (53 pixels inthis embodiment) are to be subject to correlation calculation. In thiscase, the number of pixels to be subject to correlation calculationbecomes largest. When Image A and Image B are shifted to the left and tothe right relatively one by one pixel, the number of pixels to besubject to correlation calculation is decreased one by one pixel. Inthis embodiment, when the number of pixels to be subject to correlationcalculation is decreased to 10 pixels as the predetermined number ofpixels to be subject to correlation calculation, the shift process forthe correlation calculation between Image A and Image B is finished.When the shift pixel amount k is ±43, the number of pixels to be subjectto correlation calculation is 10.

If the correlation amount COR(k) is zero, Image A and Image B arecompletely identical without an image displacement at the shift amount kand in the pixel range to be subject to correlation calculation. Byevaluating the correlation amount difference ΔCOR(k), the position atwhich the correlation amount COR(k) changes from a decrease to anincrease can be obtained as an in-focus candidate point by the pixelshift amount k at which the correlation amount difference ΔCOR(k)changes from a negative value to a positive value to cross zero(hereinafter referred to also as a zero crossing point). As thecorrelation amount difference ΔCOR(k) between pixels shown in FIG. 8, itis possible to select the pixel shift amount k at the zero crossingpoint of the correlation amount difference ΔCOR(k) between two images asa defocus candidate value of the in-focus candidate point.

A waveform degree-of-conformity calculator 123 illustrated in FIG. 2calculates a waveform degree-of-conformity of two images usingMin_COR(k) of the equation (3) and Max_COR(k) of the equation (4) asfollows.

$\begin{matrix}{{{Min\_ COR}(k)} = {\sum\limits_{i}\left\{ {{Min}\left( {A_{i},B_{i - k}} \right)} \right\}}} & (3) \\{{{Max\_ COR}(k)} = {\sum\limits_{t}\left\{ {{Max}\left( {A_{i},B_{i - k}} \right)} \right\}}} & (4)\end{matrix}$where A_(i) and B_(i) represent pixel values (luminance) of the i-thpixels of Image A and Image B, respectively, and k represents the pixelshift amount, in which a sum is calculated with respect to all pixels icomparing pixel values of Image A and Image B. In addition, Min(x,y) andMax(x,y) are functions respectively indicating smaller one and largerone of x and y.

The correlation amount COR(k) calculated by the correlation calculationprocessor 122 and the waveform degree-of-conformity (Min_COR(k) andMax_COR(k)) calculated by the waveform degree-of-conformity calculator123 are supplied to a defocus amount calculator 124. The defocus amountcalculator 124 compares the waveform degree-of-conformity (Min_COR(k)and Max_COR(k)) obtained by the waveform degree-of-conformity calculator123 corresponding to the pixel shift amount at a zero crossing pointobtained by the correlation calculation processor 122 (FIG. 9). Such apixel shift amount that a difference between Min_COR(k) and Max_COR(k)as waveform degree-of-conformity data becomes a minimum value isselected as the in-focus candidate point so as to calculate the defocusamount, which is output to the lens controller 116 illustrated in FIG.1.

Next, an operation when the sensor waveforms of Image A and Image Billustrated in FIG. 10 are input is described in detail.

The phase difference amount FB in FIG. 10 is a phase difference amount(image displacement amount) between two images (Image A and Image B)output from the AF sensor 118 when an image of the image pickup systemis in an in-focus state, which is stored in the sensor back memory unit120. In other words, FIG. 10 illustrates an example of the two-imagewaveform of the AF sensor when the sensor back has a displacement. Inthe example illustrated in FIG. 10, Image B is displaced with respect toImage A by four pixels toward the right side. Therefore, as to objectimages formed on the line sensor for Image A and the line sensor forImage B, field angle ranges of the object images formed on the linesensors are not completely identical to each other. In the exampleillustrated in FIG. 10, one peak is observed in a waveform of aluminance signal of Image A, while two peaks are observed in Image B.This is because there is a phase difference amount FB between Image Aand Image B. It is because, in the waveform illustrated in FIG. 10, apeak position in the waveform of Image A corresponding to a left sidepeak in the waveform of Image B is outside the range of the line sensorand cannot be detected by the line sensor for Image A.

FIG. 11 is an explanatory diagram for describing this situation. Onlythe waveforms in the region surrounded by a dotted line rectangle (rangeof numerals 1 to 53 in the horizontal axis) are actually detected asluminance signal waveforms of Image A and Image B, and this regioncorresponds to the waveforms of FIG. 10. FIG. 11 also illustrates aluminance signal waveform by a solid line when the left side of numeral1 on the horizontal axis is detected by the line sensor for Image A. Inthe region of the left side of numeral 1 on the horizontal axis, thereis a peak of the Image A waveform corresponding to the peak on the leftside of the waveform of Image B.

In this way, even if the image of the image pickup system is in focus,when there is a phase difference amount FB, one of the pair of imagesmay not be formed on the AF sensor when the object exists near an end ofthe AF sensor. In this state, if the waveform data of the luminancesignals obtained by the line sensor for Image A and the line sensor forImage B is used for the correlation calculation as it is, so as todetermine the defocus amount for AF control, correct focus adjustmentmay not be performed. By evaluating the phase difference between twoimages for a common part of the field angle ranges detected on the linesensor for Image A and the line sensor for Image B, a correct defocusamount can be calculated. Therefore, if there is a phase differenceamount FB, based on the phase difference amount FB, the pixels to becalculated are set in a manner that only the luminance data (waveform)from a pixel region (pixels to be calculated) in which the field angleranges detected by the line sensor for Image A and the line sensor forImage B are overlapped is used for calculation of the defocus amount.

The sensor waveform read out controller 121 reads out the phasedifference amount FB stored in the sensor back memory unit 120 and setsthe pixels to be calculated in each of the pair of line sensors to beused for calculation for obtaining the defocus amount from the sensorwaveform stored in the sensor waveform memory unit 119, in accordancewith the phase difference amount FB.

FIG. 12 illustrates a process flow for setting the pixels to becalculated by the sensor waveform read out controller 121.

In Step S100, the phase difference amount FB stored in the sensor backmemory unit 120 is read out. In Step S101, it is determined whether ornot the read phase difference amount FB is zero. If the phase differenceamount FB is zero, the process proceeds to Step S106 without changingthe pixels to be calculated corresponding to the range of waveforms tobe used for calculating the defocus amount. In other words, in thiscase, all regions of the pair of line sensors may be set as the pixelsto be calculated. If the phase difference amount FB is not zero in StepS101, the process proceeds to Step S102.

In Step S102, an offset amount of read out pixel address between Image Aand Image B as a relative shift amount between waveforms of Image A andImage B is calculated based on the phase difference amount FB, and theprocess proceeds to Step S103. In other words, it is calculated how manypixels the phase difference amount FB corresponds to in the waveforms ofImage A and Image B.

In Step S103, it is determined whether or not the phase differenceamount FB is larger than zero. If the phase difference amount FB islarger than zero, the process proceeds to Step S104. If the phasedifference amount FB is smaller than zero, the process proceeds to StepS105. Here, as described above, it is supposed that the phase differenceamount FB becomes positive when the waveform of Image B is shifted tothe left with respect to the waveform of Image A, while the phasedifference amount FB becomes negative when the waveform of Image B isshifted to the right with respect to the waveform of Image A.

In Steps S104 and S105, based on the offset amount obtained in StepS102, in each of Image A and Image B, the pixels to be calculatedcorresponding to a waveform of the luminance signal to be used forcalculation of the defocus amount are designated by setting the read outstart address of the pixel data (left side end in the diagram) and theread out end address (right side end in the diagram).

Step S104 is a case where a state of Image B being pixel-shifted to theright side with respect to Image A is detected. Because Image B isshifted to the left side and Image A is shifted to the right siderelatively, for Image B, a value obtained by adding an offset valuecalculated in Step S102 to the address corresponding to a pixel on theleft end is used as the read out start address while the addresscorresponding to a pixel on the right end is used as the read out endaddress. In addition, for Image A, an address corresponding to a pixelon the left end is used as the read out start address, and a valueobtained by subtracting an offset value from an address corresponding tothe pixel on the right end is used as the read out end address.

Step S105 is a case where a state of Image B being pixel-shifted to theleft side with respect to Image A is detected. Because Image B isshifted to the right side and Image A is shifted to the left siderelatively, for Image A, a value obtained by adding an offset valuecalculated in Step S102 to the address corresponding to a pixel on theleft end is used as the read out start address while the addresscorresponding to a pixel on the right end is used as the read out endaddress. In addition, for Image B, an address corresponding to a pixelon the left end is used as the read out start address, and a valueobtained by subtracting an offset value from an address corresponding tothe pixel on the right end is used as the read out end address.

In other words, in Steps S104 and S105, as for one of the pair of linesensors, based on the image displacement amount, pixels excluding thenumber of pixels corresponding to the image displacement amount from oneend are set as the pixels to be calculated. As for the other linesensor, pixels excluding the number of pixels corresponding to the imagedisplacement amount from the end opposite to the one end are set as thepixels to be calculated.

In Step S106, based on the read out start address and the read out endaddress obtained for each of Image A and Image B, the pixels to becalculated of each of Image A and Image B are set and output to thesensor waveform memory unit 119 of FIG. 2.

The read out sensor waveform output from the sensor waveform memory unit119 after Step S104 is illustrated in FIG. 13A and FIG. 13B.

As illustrated in FIG. 13A and FIG. 13B, due to the operation of eachstep in FIG. 12, considering the phase difference amount FB, only theregion (field angle region) of images formed on both the sensor forImage A and the sensor for Image B is reconstructed as the waveforms ofImage A and Image B to be used for the correlation calculation processand the waveform degree-of-conformity calculation process. Using thereconstructed pair of waveform signals, the correlation calculationprocessor 122, the waveform degree-of-conformity calculator 123, and thedefocus amount calculator 124 described above perform detection toobtain a satisfactory AF detection result.

As described above, according to this embodiment, even if a backdisplacement is generated between the image of the image pickup systemand the AF sensor, an accurate result of distance measurement can beobtained regardless of a position of the object as the AF target on thesensor.

In the embodiment described above, the setting of the pixels to becalculated is performed by the sensor waveform read out controller 121that designates the read out start address and the read out end addressof the luminance signal of the AF sensor, but the present invention isnot limited thereto. It is possible to designate the read out startaddress of the luminance signal of the AF sensor and the number ofpixels to be calculated so as to set the pixels to be calculated.

The embodiment described above exemplifies a case where a focusdetecting apparatus is constituted in the lens apparatus, but thepresent invention is not limited thereto. The action and effect of thepresent invention can be obtained also when the present invention isapplied to an apparatus for performing focus detection of a phasedifference method by separating the light beam of the image pickupoptical system. In other words, the action and effect of the presentinvention can be obtained also in an image pickup apparatus including alens and an image pickup element for imaging object light from the lens,which includes the focus detecting apparatus of the embodiment describedabove in the image pickup apparatus, and performs focus adjustment ofthe lens in accordance with defocus amount information obtained from thefocus detecting apparatus.

While the present invention has been described with reference toexemplary embodiments, it is to be understood that the invention is notlimited to the disclosed exemplary embodiments. The scope of thefollowing claims is to be accorded the broadest interpretation so as toencompass all such modifications and equivalent structures andfunctions.

This application claims the benefit of Japanese Patent Application No.2012-228693, filed Oct. 16, 2012, which is hereby incorporated byreference herein in its entirety.

What is claimed is:
 1. A focus detecting apparatus for detecting adefocus amount of an image pickup optical system based on a displacementamount between a pair of images formed by a pair of light beams splitfrom the image pickup optical system so as to pass through a pair ofpupil regions, the focus detecting apparatus comprising: a pair oflenses; a pair of phase difference detecting sensors forphotoelectrically converting a pair of object images formed by the pairof lenses into a pair of image signals; a memory unit for storing animage displacement amount, which is an imaging position displacement ina longitudinal direction of the pair of phase difference detectingsensors, between the pair of image signals obtained by the pair of phasedifference detecting sensors when the image pickup optical systemfocuses on a predetermined object; a waveform read out controller forsetting pixels to be calculated of the pair of phase differencedetecting sensors, respectively, based on the image displacement amountstored in the memory unit; a correlation calculator for calculating acorrelation amount between the pair of image signals obtained from thepixels to be calculated of the pair of phase difference detectingsensors; a waveform degree-of-conformity calculator for calculating awaveform degree-of-conformity that is a degree-of-conformity between thepair of image signals based on the pair of image signals obtained fromthe pixels to be calculated of the pair of phase difference detectingsensors; and a defocus amount calculator for calculating the defocusamount based on the correlation amount calculated by the correlationcalculator and the waveform degree-of-conformity calculated by thewaveform degree-of-conformity calculator.
 2. A focus detecting apparatusaccording to claim 1, wherein the waveform read out controller sets, asthe pixels to be calculated, pixels excluding a number of pixelscorresponding to the image displacement amount from one end based on theimage displacement amount in one of the pair of phase differencedetecting sensors, and sets, as the pixels to be calculated, pixelsexcluding the number of pixels corresponding to the image displacementamount from an end opposite to the one end in the other of the pair ofphase difference detecting sensors.
 3. A lens apparatus, comprising afocus detecting apparatus for detecting a defocus amount of an imagepickup optical system based on a displacement amount between a pair ofimages formed by a pair of light beams split from the image pickupoptical system so as to pass through a pair of pupil regions, the focusdetecting apparatus comprising: a pair of lenses; a pair of phasedifference detecting sensors for photoelectrically converting a pair ofobject images formed by the pair of lenses into a pair of image signals;a memory unit for storing an image displacement amount, which is animaging position displacement in a longitudinal direction of the pair ofphase difference detecting sensors, between the pair of image signalsobtained by the pair of phase difference detecting sensors when theimage pickup optical system focuses on a predetermined object; awaveform read out controller for setting pixels to be calculated of thepair of phase difference detecting sensors, respectively, based on theimage displacement amount stored in the memory unit; a correlationcalculator for calculating a correlation amount between the pair ofimage signals obtained from the pixels to be calculated of the pair ofphase difference detecting sensors; a waveform degree-of-conformitycalculator for calculating a waveform degree-of-conformity that is adegree-of-conformity between the pair of image signals based on the pairof image signals obtained from the pixels to be calculated of the pairof phase difference detecting sensors; and a defocus amount calculatorfor calculating the defocus amount based on the correlation amountcalculated by the correlation calculator and the waveformdegree-of-conformity calculated by the waveform degree-of-conformitycalculator, wherein the lens apparatus is configured to perform focusadjustment in accordance with a defocus amount from the focus detectingapparatus.
 4. An image pickup apparatus, comprising: a lens apparatusincluding a focus lens; a camera apparatus including an image pickupelement for imaging object light from the lens apparatus; and a focusdetecting apparatus for detecting a defocus amount of an image pickupoptical system based on a displacement amount between a pair of imagesformed by a pair of light beams split from the image pickup opticalsystem so as to pass through a pair of pupil regions, the focusdetecting apparatus comprising: a pair of lenses; a pair of phasedifference detecting sensors for photoelectrically converting a pair ofobject images formed by the pair of lenses into a pair of image signals;a memory unit for storing an image displacement amount, which is animaging position displacement in a longitudinal direction of the pair ofphase difference detecting sensors, between the pair of image signalsobtained by the pair of phase difference detecting sensors when theimage pickup optical system focuses on a predetermined object; awaveform read out controller for setting pixels to be calculated of thepair of phase difference detecting sensors, respectively, based on theimage displacement amount stored in the memory unit; a correlationcalculator for calculating a correlation amount between the pair ofimage signals obtained from the pixels to be calculated of the pair ofphase difference detecting sensors; a waveform degree-of-conformitycalculator for calculating a waveform degree-of-conformity that is adegree-of-conformity between the pair of image signals based on the pairof image signals obtained from the pixels to be calculated of the pairof phase difference detecting sensors; and a defocus amount calculatorfor calculating the defocus amount based on the correlation amountcalculated by the correlation calculator and the waveformdegree-of-conformity calculated by the waveform degree-of-conformitycalculator, wherein the image pickup apparatus is configured to performfocus adjustment of the focus lens in accordance with a defocus amountfrom the focus detecting apparatus.
 5. A method of detecting a defocusamount of an image pickup optical system based on a displacement amountbetween a pair of images formed by a pair of light beams split from theimage pickup optical system so as to pass through a pair of pupilregions, the method comprising: storing an image displacement amount,which is an imaging position displacement in a longitudinal direction ofa pair of phase difference detecting sensors for photoelectricallyconverting a pair of object images formed by a pair of lenses, between apair of image signals obtained by the pair of phase difference detectingsensors when the image pickup optical system focuses on a predeterminedobject; setting pixels to be calculated of the pair of phase differencedetecting sensors, respectively, based on the image displacement amount;calculating a correlation amount between the pair of image signals and awaveform degree-of-conformity that is a degree-of-conformity between thepair of image signals based on the pair of image signals obtained fromthe pixels to be calculated; and calculating the defocus amount based onthe calculated correlation amount and the calculated waveformdegree-of-conformity.